/**
    ******************************************************************************
    * @file    database.cpp
    * @author  debian
    * @version V1.0.0
    * @date    2020-03-07
    * @brief   数据库
    ******************************************************************************
    * @attention
    *
    *
    ******************************************************************************
    */ 

/* Includes ------------------------------------------------------------------*/
#include "database.h"
#include "sqlconnection.h"
#include <stdio.h>
#include <iostream>


//g++ sqlconnection.cpp database.cpp -I /usr/include/mysql/ -L /usr/lib/i386-linux-gnu/ -lmysqlclient -o database

/** @addtogroup DataStruct_Driver
    * @{
    */

/** @addtogroup database
    * @{
    */

/* Private typedef -----------------------------------------------------------*/

/* Private define ------------------------------------------------------------*/

/* Private macro -------------------------------------------------------------*/

/* Private variables ---------------------------------------------------------*/

/* Private function prototypes -----------------------------------------------*/

/* Private functions ---------------------------------------------------------*/


/** @defgroup database_Exported_Functions database Exported Functions
    * @{
    */

/** @defgroup database_Exported_Functions_Group1 Initialization and deinitialization functions
    *  @brief    Initialization and Configuration functions
    *
@verbatim    
    ===============================================================================
                ##### Initialization and deinitialization functions #####
    ===============================================================================
    [..]
        This section provides functions allowing to initialize and de-initialize the database
        to be ready for use.
 
@endverbatim
    * @{
    */ 

/**
    * @brief  database构造函数
    * @param  
    * @retval 
    */ 
   int main(int argc, char **argv)
   {
       bool ret = false;
       Sqlconnection sql;

        ret = sql.connect(NULL, "root", "cgr123456", NULL, 3306);
        std::cout << "连接结果" << ret << std::endl;

        //const char *table = "CREATE TABLE playerinfo(id int(3) auto_increment not null primary key, name char(8), sex char(8), age int(1) ) ";

        sql.UseDataBase("my");
        //ret = sql.Execyte(table);

        sql.GetData("playerinfo", "name", "啊甘");
        std::cout << "连接结果" << ret << std::endl;

       return 0;
   }

/**
    * @brief  database析构函数
    * @param  
    * @retval 
    */ 

    
/**
    * @}
    */

/** @defgroup database_Exported_Functions_Group2 operation functions 
    *  @brief   operation functions
    *
@verbatim   
    ===============================================================================
                        ##### operation functions #####
    ===============================================================================
    [..]
        This subsection provides a set of functions allowing to manage the database.

@endverbatim
    * @{
    */

        /* 操作函数写在这里 */


    /**
    * @}
    */


/**
    * @}
    */

/**
    * @}
    */

/**
    * @}
    */

/************************ (C) 2020 HOME 深圳龙华 *****END OF FILE****/

